package org.lion.jingbeifang_interviewquestions.calculatePrice.entity;

import lombok.Data;
import org.lion.jingbeifang_interviewquestions.calculatePrice.enums.GoodsItem;

import java.math.BigDecimal;

@Data
public class StrategyDiscount {

    private Double discount;


    public StrategyDiscount(Double discount){
        if (discount > 1 ){
            throw new ArithmeticException("The weight must be less than 1!");
        }
        this.discount = discount;
    }

}
